package com.xie.service.impl;

import com.xie.dao.AccountDao;
import com.xie.domain.Account;
import com.xie.domain.Student;
import com.xie.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 本间芽衣子
 * @author As long as you are on the road, there is no place you can’t reach。
 * @program: ssm 业务层实现
 * @date 2021年04月19日 8:19
 */
@Service("accountService")
public class AccountServiceImpl  implements AccountService {

    @Autowired
    private AccountDao accountDao;

    @Override
    public void saveAccount(Account account) {
        accountDao.saveAccount(account);
    }

    @Override
    public List<Account> findAccount() {
        return accountDao.findAccount();
    }

    @Override
    public Integer deleteAccount(int id) {
        return accountDao.deleteAccount(id);
    }

    @Override
    public Account getAccount(int id) {
        return accountDao.getAccount(id);
    }


    @Override
    public void modifyAccount(int id, String name, Double money) {
        accountDao.modifyAccount(id, name, money);
    }


}
